package com;

import com.study.bean.Blog;
import com.study.bean.BlogQuery;
import com.study.dao.impl.BlogDaoImpl;
import org.junit.Test;

import java.sql.SQLException;
import java.util.List;

public class test {


    @Test
    public void s() throws SQLException {
        BlogDaoImpl blogDao = new BlogDaoImpl();

        int i = blogDao.selectTotalCount();

        System.out.println(i);

    }

    @Test
    public void a() throws SQLException {
        BlogQuery blogQuery = new BlogQuery();
        blogQuery.setContent("4545");
        blogQuery.setPage(1);
        blogQuery.setLimit(10);

        BlogDaoImpl blogDao = new BlogDaoImpl();

        List<Blog> blogs = blogDao.selectByPage(blogQuery);

        blogs.forEach(System.out::println);
    }
}
